package com.yqg.demo.controller;

import com.yqg.demo.task.TalkReceive;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;

import javax.annotation.PostConstruct;

/**
 * @author suzhuang
 * @ClassName: TestController
 * @Function: TODO
 * @Date: 2023/5/11 9:01
 */
@Controller
@Slf4j
public class TestController {



//    @Value("${sent.data.nwip}")
//    private String IpAddress;


    @Value("${sendUrl}")
    private String sendUrl;

    @Value("${byteNum}")
    private int byteNum;

    @Value("${amount}")
    private int amount;

    @PostConstruct
    public void init() {
        //接受内网数据
        new Thread(new TalkReceive("plc机器数据：",sendUrl,byteNum,amount)).start();
    }

}

